//
//  STGoodsTableViewCell.m
//  赛拓
//
//  Created by 王磊 on 8/4/16.
//  Copyright © 2016 立金所. All rights reserved.
//

#import "STGoodsTableViewCell.h"

@implementation STGoodsTableViewCell

- (void)configSubViews {
    [super configSubViews];
    
    self.layer.borderColor = ST_EDGE_COLOR.CGColor;
    
    self.layer.borderWidth = 0.5;
    
    //    UILabel *text = [[UILabel alloc]init];
    //
    //    self.textLabel = text;
    //
    //    text.textColor = ST_BLACK_COLOR;
    //
    //    [self addSubview:text];
    
    self.textLabel.font = ST_14_FONT;
    
    UILabel *detailLabel = [[UILabel alloc]init];
    
    detailLabel.textColor = ST_BLACK_COLOR;
    
    detailLabel.textAlignment = NSTextAlignmentRight;
    
    self.detailLabel = detailLabel;
    
    detailLabel.font = ST_13_FONT;
    
    [self addSubview:detailLabel];
    
}
- (void)updateData:(id)data {
    
    self.detailLabel.text = data;
    
    if (self.indexPath.row == 9) {
        
        self.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
        
        self.detailLabel.text = @"";
    }
    
}
#define margin 10
- (void)layoutSubviews {
    [super layoutSubviews];
    
    self.textLabel.frame = CGRectMake(10, 0, self.k_width, self.k_height);
    
    self.detailLabel.frame = CGRectMake(0, 0, self.k_width - margin, self.k_height);
    
}

@end
